<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Robocup-denayer-project-a: read-only/trunk/source/besturing.h Bron Bestand</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Gegenereerd door Doxygen 1.7.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Zoeken');
--></script>
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Hoofd&nbsp;Pagina</span></a></li>
      <li><a href="annotated.html"><span>Klassen</span></a></li>
      <li class="current"><a href="files.html"><span>Bestanden</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
          <span class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Zoeken" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </span><span class="right"></span>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;Lijst</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>read-only/trunk/source/besturing.h</h1>  </div>
</div>
<div class="contents">
<a href="besturing_8h.html">Ga naar de documentatie van dit bestand.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef BESTURING_H_</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define BESTURING_H_</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;math.h&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;<a class="code" href="thread_8h.html">thread.h</a>&quot;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;<a class="code" href="motors_8h.html">motors.h</a>&quot;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;<a class="code" href="muis_8h.html">muis.h</a>&quot;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;<a class="code" href="movement_8h.html">movement.h</a>&quot;</span>
<a name="l00018"></a><a class="code" href="besturing_8h.html#a9ff476c1139fb6a63d420b961ec849f1">00018</a> <span class="preprocessor">#define MAXMAT  4</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="comment">//manoevre ID&#39;s</span>
<a name="l00021"></a><a class="code" href="besturing_8h.html#a91effc0d155bbc8c713206e3c2bb4556">00021</a> <span class="preprocessor">#define NTR 0 //in neutraal : stilstaan //best 0 laten //TODO amount == tijd?</span>
<a name="l00022"></a><a class="code" href="besturing_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">00022</a> <span class="preprocessor"></span><span class="preprocessor">#define FWD 1 //voorwaarts</span>
<a name="l00023"></a><a class="code" href="besturing_8h.html#ababc4097c218c2f90a92b311e09a8e42">00023</a> <span class="preprocessor"></span><span class="preprocessor">#define BWD 2 //achterwaarts</span>
<a name="l00024"></a><a class="code" href="besturing_8h.html#a0b0d6fd5065b35eb0a2806bc3975840b">00024</a> <span class="preprocessor"></span><span class="preprocessor">#define TNL 3 //turn left //CCW</span>
<a name="l00025"></a><a class="code" href="besturing_8h.html#ac8992dc9cdf235465b456a84bb780cef">00025</a> <span class="preprocessor"></span><span class="preprocessor">#define TNR 4 //turn right//CW</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="comment">// MotorSturing class definition</span>
<a name="l00029"></a><a class="code" href="class_besturing.html">00029</a> <span class="keyword">class </span><a class="code" href="class_besturing.html">Besturing</a> : <span class="keyword">public</span> <a class="code" href="class_thread.html" title="Thread.">Thread</a>
<a name="l00030"></a>00030 {
<a name="l00031"></a>00031         <span class="keyword">public</span>:
<a name="l00032"></a>00032                 <span class="comment">// constructor  </span>
<a name="l00033"></a>00033                 <a class="code" href="class_besturing.html#a5a5a117fc659778bfe47e2fd63e08c42">Besturing</a>(<span class="keywordtype">void</span>);
<a name="l00034"></a>00034                 <a class="code" href="class_besturing.html#ab776a244947750dbc85eb46883979791">~Besturing</a>(<span class="keywordtype">void</span>);
<a name="l00035"></a>00035                 
<a name="l00036"></a>00036                 <span class="keywordtype">void</span>    <a class="code" href="class_besturing.html#a8d7400ebc6b2fff1e5e100c3a8de91f6" title="Thread::execute();.">execute</a>();      
<a name="l00037"></a>00037                 <span class="keywordtype">void</span>    <a class="code" href="class_besturing.html#a5fc2f2acafc8f4f26447ca3f529a5099" title="ga naar punt en draai u dan richting angle">goTo</a>(<span class="keywordtype">int</span>,<span class="keywordtype">int</span>,<span class="keywordtype">float</span>);
<a name="l00038"></a>00038                 <span class="keywordtype">void</span>    <a class="code" href="class_besturing.html#a216acb50c4b2a0efbd999203e4928d40">setLocation</a>(<span class="keywordtype">int</span>,<span class="keywordtype">int</span>,<span class="keywordtype">float</span>);
<a name="l00039"></a>00039                 <span class="keywordtype">bool</span>    <a class="code" href="class_besturing.html#a32264f54af9bf7a88550096e93119928">isBusy</a>();
<a name="l00040"></a>00040                 <span class="keywordtype">bool</span>    <a class="code" href="class_besturing.html#aac7a1e0be9fe2f6fdab6e50e7f663b3a">isReady</a>();
<a name="l00041"></a>00041                 <span class="keywordtype">bool</span>    <a class="code" href="class_besturing.html#a2d5e31d6391452b931b0c46729a8634d" title="Vermenigvuldig arrays.">MatrixMultiply</a>(<span class="keywordtype">float</span> A[<a class="code" href="besturing_8h.html#a9ff476c1139fb6a63d420b961ec849f1" title="Besturing.">MAXMAT</a>][<a class="code" href="besturing_8h.html#a9ff476c1139fb6a63d420b961ec849f1" title="Besturing.">MAXMAT</a>],<span class="keywordtype">float</span> B[MAXMAT][MAXMAT],<span class="keywordtype">float</span> R[MAXMAT][MAXMAT],<span class="keywordtype">int</span> M,<span class="keywordtype">int</span> L,<span class="keywordtype">int</span> N);
<a name="l00042"></a>00042         <span class="keyword">private</span>:
<a name="l00043"></a>00043                 <a class="code" href="class_motors.html">Motors</a>  *motors;
<a name="l00044"></a>00044                 <a class="code" href="class_muis.html">Muis</a>    *muisL;
<a name="l00045"></a>00045                 <a class="code" href="class_muis.html">Muis</a>    *muisR;
<a name="l00046"></a>00046                 <span class="keywordtype">bool</span>    ready,busy;
<a name="l00047"></a>00047                 <span class="comment">// current location</span>
<a name="l00048"></a>00048                 <span class="keywordtype">int</span>             x,y;
<a name="l00049"></a>00049                 <span class="keywordtype">float</span>   angle;
<a name="l00050"></a>00050                 <span class="comment">// target parameters</span>
<a name="l00051"></a>00051                 <span class="keywordtype">int</span>             tx,ty;
<a name="l00052"></a>00052                 <span class="keywordtype">float</span>   tangle;
<a name="l00053"></a>00053                 <span class="comment">// static vars</span>
<a name="l00054"></a>00054                 <span class="keywordtype">float</span>   posMat[3][4];
<a name="l00055"></a>00055 }; 
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 <span class="preprocessor">#endif </span><span class="comment">/* BESTURING_H_ */</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Gegenereerd op Do 19 Mei 2011 10:15:28 voor Robocup-denayer-project-a door&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
